LIVE555= /usr/local

all: webcam

INCLUDES = -I$(LIVE555)/include/UsageEnvironment -I$(LIVE555)/include/groupsock \
	   -I$(LIVE555)/include/liveMedia -I$(LIVE555)/include/BasicUsageEnvironment
CXXFLAGS= -c -g3 -O0 -fPIC $(INCLUDES)
USAGE_ENVIRONMENT_LIB = $(LIVE555)/lib/libUsageEnvironment.a
BASIC_USAGE_ENVIRONMENT_LIB = $(LIVE555)/lib/libBasicUsageEnvironment.a
LIVEMEDIA_LIB = $(LIVE555)/lib/libliveMedia.a
GROUPSOCK_LIB = $(LIVE555)/lib/libgroupsock.a
LOCAL_LIBS =	$(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
		$(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)

webcam: main.o webcamframesource.o $(LOCAL_LIBS)
	$(CXX) -o $@ $^ -fPIC  -L/usr/local/lib -g3 -O0 -lpthread

cpp.o:
	$(CXX) $(CXXFLAGS) $<

clean:
	rm -f *.o
	rm -f webcam
